Main Page | Data Structures | File List | Data Fields | Globals

BustaModelGameState Class Reference

Model representing entire game state. More...

#include <BustaModelGameState.h>


Public Member Functions

 BustaModelGameState ()
 Constructor.
 ~BustaModelGameState ()
 Destructor.
int getScore ()
 Gets score.
void setScore (int s)
 Sets score.
void addCustomer (BustaModelCustomer *c)
 Adds customer.
int removeCustomer (BustaModelCustomer *c)
 Deletes customer.
BustaModelCustomergetCustomer (int n)
 Gets customer in queue.
BustaModelTipJargetTipJar ()
 Gets tip jar.
BustaModelFoodPiecegetBoard (int i, int j)
 gets Foodpiece in board
BustaModelChefgetChef ()
 gets the chef
BustaModelCursorgetCursor ()
 Gets cursor.
void setBoard (int i, int j, BustaModelFoodPiece *fp)
 Sets board location to specified foodPiece.
void removeFromBoard (int i, int j)
 Deletes foodpiece on board.
void updateFoodPieces (int u)
 Updates foodpiece on board.
int updateCustomers ()
 Updates customer queue.
void jumbleBoard ()
 Jumbles the contents of the board.


Detailed Description

Model representing entire game state.

Model representing entire game state, has score, tipjar, chef, customer queue


Constructor & Destructor Documentation

BustaModelGameState::BustaModelGameState  ) 
 

Constructor.

Initializes variables

BustaModelGameState::~BustaModelGameState  ) 
 

Destructor.

Deletes models


Member Function Documentation

void BustaModelGameState::addCustomer BustaModelCustomer c  ) 
 

Adds customer.

Adds a Customer to the queue, if more than two Customers deletes the oldest one

BustaModelFoodPiece * BustaModelGameState::getBoard int  i,
int  j
 

gets Foodpiece in board

Returns a pointer to the FoodPiece in the specified row and column

BustaModelChef * BustaModelGameState::getChef  ) 
 

gets the chef

Returns a pointer to the chef

BustaModelCursor * BustaModelGameState::getCursor  ) 
 

Gets cursor.

Returns a pointer to the cursor

BustaModelCustomer * BustaModelGameState::getCustomer int  n  ) 
 

Gets customer in queue.

Returns a pointer to the customer in the nth location in the queue

int BustaModelGameState::getScore  ) 
 

Gets score.

Gets the score of the player

BustaModelTipJar * BustaModelGameState::getTipJar  ) 
 

Gets tip jar.

Returns a pointer to the tip jar

void BustaModelGameState::jumbleBoard  ) 
 

Jumbles the contents of the board.

Jumbles the order of the ingredients in the board. The contents are maintained.

int BustaModelGameState::removeCustomer BustaModelCustomer c  ) 
 

Deletes customer.

Deletes the specified customer

void BustaModelGameState::removeFromBoard int  i,
int  j
 

Deletes foodpiece on board.

Deletes the foodpiece in the specified location

void BustaModelGameState::setBoard int  i,
int  j,
BustaModelFoodPiece fp
 

Sets board location to specified foodPiece.

For specified board location, removes current foodpiece and sets to FoodPiece fp

void BustaModelGameState::setScore int  s  ) 
 

Sets score.

Sets the score of the player

int BustaModelGameState::updateCustomers  ) 
 

Updates customer queue.

Replaces any customers whose time has run out. Returns number of customers removed from queue.

void BustaModelGameState::updateFoodPieces int  u  ) 
 

Updates foodpiece on board.

Updates the state of the foodpieces on the board, replaces any necessary. If u ==0, automatically updates based on time. If u==1, freshens all ingredients. If u ==-1, spoils all ingredients.


Generated on Sun Aug 14 22:24:56 2005 for BustaSandwich Models by  doxygen 1.4.2-20050421